<?php
namespace Controllers;

use Config\Base as Config;

/**
 * @author Evgeny Baranov <evgeny@baranov.eu>
 */
class Error extends Base {
    function e404(array $param) {
        header("Not Found", true, 404);
        $this->setView('Error')->setTmpl('error.phtml');
        return array(
            'title' => 'Not Found',
            'link' => 'http://' . Config::instance()->DOMAIN,
            'message' => implode('', $param)
        );
    }

    function e403(array $param) {
        header("Forbidden", true, 403);
        $this->setView('Error')->setTmpl('error.phtml');
        return array(
            'title' => 'Forbidden',
            'link' => 'http://' . Config::instance()->DOMAIN,
            'message' => implode('', $param)
        );
    }
}
